﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:Custom="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:GameLogic_Logic="clr-namespace:GameLogic.Logic;assembly=GameLogic" xmlns:il="clr-namespace:Microsoft.Expression.Interactivity.Layout;assembly=Microsoft.Expression.Interactions"
	xmlns:im="clr-namespace:Microsoft.Expression.Interactivity.Media;assembly=Microsoft.Expression.Interactions"
	mc:Ignorable="d"
	x:Class="Demo_End.GameContent"
	d:DesignWidth="480" d:DesignHeight="800">

	<Canvas x:Name="LayoutRoot">
		<Custom:Interaction.Behaviors>
			<GameLogic_Logic:GameLoop/>
		</Custom:Interaction.Behaviors>
		<Canvas.Background>
			<ImageBrush Stretch="Fill" ImageSource="beach_bg.png"/>
		</Canvas.Background>
		<Rectangle x:Name="_left" Width="10" Height="800">
			<Custom:Interaction.Behaviors>
				<GameLogic_Logic:StaticCollidableBehavior/>
			</Custom:Interaction.Behaviors>
		</Rectangle>
		<Rectangle x:Name="_right" Width="10" Height="800" Canvas.Left="470">
			<Custom:Interaction.Behaviors>
				<GameLogic_Logic:StaticCollidableBehavior/>
			</Custom:Interaction.Behaviors>
		</Rectangle>
		<Rectangle x:Name="_top" Height="10" Width="480">
			<Custom:Interaction.Behaviors>
				<GameLogic_Logic:StaticCollidableBehavior/>
			</Custom:Interaction.Behaviors>
		</Rectangle>
		<Rectangle x:Name="_bottom" Height="10" Canvas.Top="790" Width="480">
			<Custom:Interaction.Triggers>
				<GameLogic_Logic:CollisionTrigger>
					<GameLogic_Logic:ChangeGamePropertiesAction ChangeLivesOnAction="True" LivesIncrementValue="-1"/>
				</GameLogic_Logic:CollisionTrigger>
			</Custom:Interaction.Triggers>
			<Custom:Interaction.Behaviors>
				<GameLogic_Logic:StaticCollidableBehavior/>
			</Custom:Interaction.Behaviors>
		</Rectangle>
		<Ellipse x:Name="_ball" Width="60" Height="60" Canvas.Left="218" Canvas.Top="387">
			<Ellipse.Fill>
				<ImageBrush Stretch="Fill" ImageSource="ball.png"/>
			</Ellipse.Fill>
			<Custom:Interaction.Behaviors>
				<GameLogic_Logic:MovingCollidableBehavior CollisionEnabled="True" CollisionType="Bounce" AutoStart="True" Direction="90" Speed="6"/>
			</Custom:Interaction.Behaviors>
		</Ellipse>
		<Rectangle x:Name="_player" Canvas.Left="179" Canvas.Top="650" Width="150" Height="150">
			<Rectangle.Fill>
				<ImageBrush Stretch="Fill" ImageSource="player_sp.png"/>
			</Rectangle.Fill>
			<Custom:Interaction.Behaviors>
				<GameLogic_Logic:FollowMouseBehavior FollowPosition="X"/>
				<GameLogic_Logic:StaticCollidableBehavior/>
			</Custom:Interaction.Behaviors>
			<Custom:Interaction.Triggers>
				<GameLogic_Logic:CollisionTrigger>
					<GameLogic_Logic:ChangeGamePropertiesAction ChangeScoresOnAction="True" ScoresIncrementValue="1"/>
				</GameLogic_Logic:CollisionTrigger>
			</Custom:Interaction.Triggers>
		</Rectangle>
	</Canvas>
</UserControl>